﻿using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;

namespace day6_case3
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Student s1 = new Student();        
            s1.Name = "张三";
            s1.Sex = "男";
            s1.Age = 18;
            s1.Number = "3007";
            s1.Special = "计算机科学与技术";       
            s1.SayHello();
            s1.playGame();

            string separator = new string('-', 50);
            Console.WriteLine(separator);

            Teacher t1 = new Teacher();
            t1.Name = "李四";
            t1.Sex = "男";
            t1.Age = 40;
            t1.Research_Interests = "C#";
            t1.Research_Courses = "C#开发";
            t1.SayHello();
            t1.Teaching();


        }
        class Hunmanity
        {
            private string name;
            private int age;
            private string sex;
            public string Name
            {
                get { return name; }
                set { name = value; }
            }
            public string Sex
            {
                get { return sex; }
                set { sex = value; }
            }
            public int Age
            {
                get { return age; }
                set { age = value; }

            }
            public void SayHello()
            {
                Console.WriteLine("大家好，我叫" + this.Name);
                Console.WriteLine("姓别" + this.Sex);
                Console.WriteLine("我今年" + Age + "岁了");

            }
        }

        class Student : Hunmanity
        {
            private string number;
            private string special;

            public string Number
            {
                get { return number; }
                set { number = value; }
            }
            public string Special
            {
                get { return special; } 
                set { special = value; }
            }

            public void playGame()
            {
                Console.WriteLine("我的学号是" +this.number);
                Console.WriteLine("我的专业是" + this.special);
                Console.WriteLine("我爱打游戏");

            }
        }

        class Teacher : Hunmanity
        {
            private string research_interests;
            private string research_courses;
            public string Research_Interests
            {
                get { return research_interests; }
                set { research_interests = value; }
            }
            public string Research_Courses
            {
                get { return research_courses; }
                set { research_courses = value; }
            }

            public void Teaching()
            {
                Console.WriteLine("我的研究方向是" + this.research_interests);
                Console.WriteLine("我的研究课程是" + this.research_courses);
                Console.WriteLine("我爱教书");

            }
        }

    }
}
